package org.fing.edu.uy.esbadp.core.entity;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso;

import org.fing.edu.uy.esbadp.core.constants.EsbAdpPropertyConstants;


@XmlRootElement(name = EsbAdpPropertyConstants.REQUIREMENTS_ROOT_ELEMENT)
@XmlSeeAlso({DMAdpServiceRequirement.class})
public class DMAdpServiceRequirements implements Serializable{
	
	private static final long serialVersionUID = 5860319073946891016L;
	
	List<DMAdpServiceRequirement> requirements;	
	
	public DMAdpServiceRequirements(){		
	}
	
	@XmlElementRef
	public List<DMAdpServiceRequirement> getRequirements() {
		return requirements;
	}

	public void setRequirements(List<DMAdpServiceRequirement> requirements) {
		this.requirements = requirements;
	}

	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append("Requirements supported ->\n");
		for(DMAdpServiceRequirement aux : requirements){
			sb.append(aux.toString());
			sb.append("\n");
		}
		return sb.toString();
	}

}
